﻿@model ChangePasswordModel
@using RielAp.Translation;

@{
    Layout = "~/Views/Shared/_ProfileLayout.cshtml";
    ViewBag.ProfileCurrentTab = ProfileViewType.PasswordChange;
}


@if (!Html.ViewData.ModelState.IsValid)
{
    <div class="alert alert-error">
        @foreach (var modelError in Html.ViewData.ModelState.SelectMany(keyValuePair => keyValuePair.Value.Errors))
        {
            <div>@modelError.ErrorMessage</div>
        }
    </div>
}

@using (Html.BeginForm("PasswordChange", "Account", null, FormMethod.Post, new { @class = "form-horizontal", style = "width: 700px;  margin: auto;" }))
{
    <div class="control-group">
        <label class="control-label" style="width: 200px;" for="Phone">@Translation.UserProfileOldPasswordLabel</label>
        <div class="controls" style="margin-left: 220px;">
            @Html.PasswordFor(m => m.OldPassword)
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" style="width: 200px;" for="Phone">@Translation.UserProfileNewPasswordLabel</label>
        <div class="controls" style="margin-left: 220px;">
            @Html.PasswordFor(m => m.Password)
        </div>
    </div>
    <div class="control-group">
        <label class="control-label" style="width: 200px;" for="Phone">@Translation.UserProfileConfirmNewPasswordLabel</label>
        <div class="controls" style="margin-left: 220px;">
            @Html.PasswordFor(m => m.ConfirmPassword)
        </div>
    </div>
                    
    <div class="control-group">
        <div class="controls" style="margin-left: 220px;">
            <input type="submit" class="btn btn-success" value="@Translation.CabinetSaveLabel"/>
        </div>
    </div>
}

